import { mock } from 'mockjs'

const menus = [
  {
    path: '/',
    name: 'Home',
    title: '首页',
    icon: 'HomeFilled',
    children: []
  },
  {
    path: '/test-form-controls',
    name: 'TestFormControls',
    title: '表单控件测试', 
    icon: 'Document',
    children: []
  },
  {
    path: '/test-form-controls2',
    name: 'TestFormControls2',
    title: '表单控件测试2',
    icon: 'Document',
    children: []
  },
  {
    path: '/customer',
    name: 'Customer',
    title: '客户管理',
    icon: 'User',
    children: [
      {
        path: '/customer/list',
        name: 'CustomerList',
        title: '客户列表',
        icon: '',
        children: []
      },
      {
        path: '/customer/detail',
        name: 'CustomerDetail',
        title: '客户详情',
        icon: '',
        children: []
      }
    ]
  },
  {
    path: '/system',
    name: 'System',
    title: '系统管理',
    icon: 'Setting',
    children: [
      {
        path: '/system/users',
        name: 'SystemUsers',
        title: '用户管理',
        icon: '',
        children: []
      },
      {
        path: '/system/roles',
        name: 'SystemRoles',
        title: '角色管理',
        icon: '',
        children: []
      }
    ]
  }
]

export function getMenuList() {
  return menus
}

export const menuApis = [
  {
    url: '/api/menu',
    method: 'get',
    response: () => {
      return {
        code: 200,
        message: '获取成功',
        data: getMenuList()
      }
    }
  }
]

export default menus